﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OP20.ViewModels
{
    public class LifeControlViewModel : BaseViewModel
    {
        public LifeControlViewModel(IRegionManager regionManager) : base(regionManager)
        {
            InitParam();
        }
        private void InitParam()
        {
            SetCount01 = UseCount_Global.nParaData1;
            SetCount02 = UseCount_Global.nParaData2;
          

        }

        private DelegateCommand<string> _TextChangeCommand;
        public DelegateCommand<string> TextChangeCommand =>
            _TextChangeCommand ?? (_TextChangeCommand = new DelegateCommand<string>(ExecuteTextChangeCommand));

        void ExecuteTextChangeCommand(string p)
        {
            switch (p)
            {
                case "SetCount01":
                    UseCount_Global.nParaData1 = SetCount01;
                    break;
                case "SetCount02":
                    UseCount_Global.nParaData2 = SetCount02;
                    break;

              
                default:
                    break;
            }
        }


        #region 属性
        private int _SetCount01;
        public int SetCount01
        {
            get { return _SetCount01; }
            set { SetProperty(ref _SetCount01, value); }
        }

        private int _SetCount02;
        public int SetCount02
        {
            get { return _SetCount02; }
            set { SetProperty(ref _SetCount02, value); }
        }
        #endregion
    }
}
